package main

import "fmt"

func main() {

	var address string = "北京天安门"
	fmt.Println(address)

	//Go语言中string是不可变的
	//str1 := "hello"
	//str1[0] = "b" //Cannot assign to str1[0]

	//飘号的使用 ``
	str2 := `
		package main

		import "fmt"

		func main() {

		var address string = "北京天安门"
		fmt.Println(address)

		//Go语言中string是不可变的
		//str1 := "hello"
		//str1[0] = "b" //Cannot assign to str1[0]
	`
	fmt.Printf(str2 + "\n")

	//字符串拼接: 两边必须同是字符串
	var str3 = "hello" + "world"
	fmt.Println(str3)

	//+号必须在上一行, 不能再下一行开头
	var str4 = "hello" + "hello" + "hello" + "hello" + "hello" + "hello" + "hello" + "hello" + "hello" +
		"hello" + "hello" + "hello" + "hello" + "hello" + "hello" + "hello" + "hello" + "hello" + "hello" +
		"hello" + "hello" + "hello" + "hello"

	fmt.Println(str4)

}
